package com.powernode.controller;

import com.powernode.model.LoginUserDetails;
import com.powernode.model.Result;
import com.powernode.service.SysMenuService;
import com.powernode.utils.AuthUtils;
import com.powernode.vo.MenuAndAuth;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: mky
 * @date: 2024/7/9 15:04
 * @version: 1.0
 */
@RestController
@RequestMapping("/sys/menu")
@Api(value = "查询菜单权限")
public class MenuController {
    @Autowired
    private SysMenuService sysMenuService;
    @GetMapping("/nav")
    public Result<MenuAndAuth> getMenu(){
        MenuAndAuth menuAndAuth = sysMenuService.getMenuAndAuth();
        return Result.success(menuAndAuth);
    }
}
